package com.fjsh.fallback;

import com.fjsh.service.ActivitiRemoteService;
import com.fjsh.vo.ActCustomVO;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import java.util.List;

@Slf4j
@Component
public class ActivitiFallBackFactory  implements FallbackFactory<ActivitiRemoteService> {

    @Override
    public ActivitiRemoteService create(Throwable throwable) {

        log.error("工作流降级处理，调用服务异常，内容：" + throwable.getMessage());

        return new ActivitiRemoteService() {
            public List<ActCustomVO> getActCustomList(){
                return null;
            }
        };
    }

}
